<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { Socket } from '../../packages/index'
export default defineComponent({
  name: 'Home',
  components: {
  },
  mounted () {
    var ws = new Socket({
      url: 'ws://114.115.214.104:21601',
      reconnectCount: 2,
      openCb: function (e) {
        console.log(e)
      },
      messageCb: function (e) {
        console.log(e)
      }
    })
    ws.connection()
    var ws1 = new Socket({
      url: 'wss://114.115.214.104:31601',
      reconnectCount: 2,
      openCb: function (e) {
        console.log(e)
      },
      messageCb: function (e) {
        console.log(e)
      }
    })
    ws1.connection()
  }
})
</script>
